Restore bottom positioning for ordinary routed threads - #72
Conversation
Signed-off-by: Pinky <5f5ab050ec58ae208332edd544ebf705221e24c1b86d82a6ca07038a7a8f6ac9@buzz.block.builderlab.xyz>
wesbillman
left a comment
There was a problem hiding this comment.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
No blocking findings
Reviewed head 8b9082ef15dd716fbfecff0d0101272703271b29 against base 7ce898eb6f77ca4fb95f06a7c7789f63245dee28.
The production change stays within the existing thread presentation owner: ordinary root routes no longer invoke exact-message reveal, acknowledgement clears the navigation deadline without settling scrolling, and bounded pagination still controls initial bottom positioning unless reader intent takes over. Exact-target reveal/focus, request revocation, and history routing retain their existing paths.
Reviewed the complete diff and the owning UI, navigation controller/presentation lifetimes, thread reader, and reading hooks. Regression coverage includes routed/non-routed bounded loading, reader gestures, one-time completion, cancellation, a real-controller 16-second deadline case, and held-pagination browser journeys with live updates. git diff --check passed. No local test suites were rerun; existing CI supplies broad validation.
CI snapshot for this head: JavaScript (including full Vitest), Rust/tool integration, Windows notification checks, browser measurements, and DCO passed. Chromium’s complete message-navigation.spec.mjs and navigation-thread-history.spec.mjs files passed (15 cases). Both engines’ first journey shard failed at composer-links.spec.mjs:31 (expected two GitHub-decorated composer links, got zero); the WebKit second shard was still running. That failing standalone composer fixture does not mount ThreadPanel or use the modified browser fixture, so I found no change-related cause in this diff. Treat it as a separate unresolved CI gate, not a passing build or a proven flake.
No local runtime, live-relay, native-GUI, or screen-reader certification. Existing ten-page oldest-first history limits remain unchanged: bottom means bottom of returned history, not necessarily the newest reply.
No approval or merge action submitted.
Signed-off-by: Pinky <5f5ab050ec58ae208332edd544ebf705221e24c1b86d82a6ca07038a7a8f6ac9@buzz.block.builderlab.xyz>
wesbillman
left a comment
There was a problem hiding this comment.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
Source review clear
Reviewed 05b873e against exact base/merge-base 7ce898e. No actionable code finding. The independent fixture/selector lane returned clear and was verified against the owning source.
- Ordinary root visits acknowledge the mounted thread before the navigation deadline without settling scrolling. Bounded history still controls bottom positioning unless reader intent intervenes. Exact-message reveal/focus, retained anchors, Back/Forward, and revoked presentation retain their existing owners. The production and owner-test blobs are unchanged from the previously reviewed
8b9082e. - Reviewed both new test corrections against their actual consumers: the link-composer preview supplies the stable empty typing store required by
TypingIndicator; the Back test selects the real Beta channel button and explicitly waits for its unread badge. Assertions, deadlines and retry settings are not relaxed. - Exact-head hosted CI is green: run 34959748245 passed all nine CI jobs, including browser measurements and all four Chromium/WebKit journey shards. DCO, Semgrep and zizmor also passed. Exact-object
git diff --checkpassed.
Source/metadata inspection only on the authorized laptop; no checkout, dependency installation, builds, tests or PR-code execution by this automation. No live-relay, native-GUI or screen-reader certification. The existing ten-page oldest-first limit remains: bottom means bottom of returned history, not necessarily the newest reply. This is a COMMENT, not approval or a merge action.
Preserve current media test coverage, unread navigation barriers and reduced fixture histories while retaining routed-thread regression coverage. Reuse main's existing typing fixture. Signed-off-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz>
wesbillman
left a comment
There was a problem hiding this comment.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
Updated on current main; no remaining code findings
I integrated main 42984601ebe1327006526cb03d5335264b377537 into this branch without rewriting the original commits. New head: 9ef87573ec5fca2967fab8db398e47bcc0dd38be. This is an implementation/validation record, not independent human approval.
The three test conflict resolutions retain main’s media coverage, deterministic unread/head barriers, reduced fixture histories and link-composer styling/typing contract. The production patch remains +19/-6 in ThreadPanel.tsx. Ordinary root navigation acknowledges presentation before the deadline; bounded history and reader intent still own positioning. Exact reveal, cancellation, session replacement, Back, and focus paths retain their existing owners. Princess Donut independently reviewed this exact integrated head with no actionable findings; I verified the resolution and evidence.
Clean exact-head validation: mandatory hooks passed formatting/lint, TypeScript, 47 related tests in seven files (all 31 ThreadPanel cases included), and design types/guards. The complete navigation-thread-history, message-navigation, and composer-links browser files passed 32/32 in Chromium + WebKit, zero retries, 57.8s. Diff checks and all commit sign-off trailers passed. Hosted DCO passed. No assertions, timeouts, or tolerances were relaxed.
Remaining merge gates: current-head broad CI (run 35644167735, running at the latest inspection) and required reviewer/code-owner approval. GitHub reports MERGEABLE. Old-head green CI is not credited to this merge. No live-relay/native-GUI/screen-reader or release certification; existing oldest-first ten-page limits remain. No approval or merge action submitted.
wesbillman
left a comment
There was a problem hiding this comment.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
Source re-review clear; CI is not green
Reviewed head 9ef8757 against exact base 4298460. No actionable PR-introduced code findings. This is COMMENTED, not approval or merge-readiness certification.
Integration and contract
The production patch remains +19/-6 in ThreadPanel.tsx. I compared it with the previously reviewed patch and traced the current owning functions and callers, rather than treating a matching patch as sufficient integration evidence.
- Ordinary root navigation acknowledges its mounted root before the navigation deadline, without invoking exact-root reveal or settling reading. Bounded returned history still owns initial bottom positioning, unless reader input intervenes. Exact-message reveal/focus, request revocation, Back/Forward, read observation and retained anchors keep their distinct owners.
- Current-main media review, Sessions and agent/design-system integration are retained. The merged test helper preserves navigation and media argument positions; main’s deterministic unread/head barriers and reduced channel histories remain. The two held-pagination geometry cases and opt-in no-delivery reply seeding retain their assertions and isolation.
- The ten-page oldest-first bound remains intentional: bottom is the bottom of returned history, not a guarantee of the newest reply. Flat Sessions and exact top-level timeline targets retain their separate presentation owners.
Independent challenge disposition
The independent reviewer verified the merge resolution and all combined helper callers. I checked its three additional concerns against the agreed contract and prior reviewed behavior:
- Ordinary opening intentionally does not force focus into a message row. Read observation still requires actual history focus, visibility and dwell; an opened visit alone is not a read. The Close-button focus assertion preserves that distinction.
- A mounted cached root may acknowledge presentation before the history read finishes. A later history failure remains visible with retry; it does not retroactively turn a presented visit into navigation failure. Pre-presentation errors still fail the pending attempt. Waiting for complete history would undo the deadline/positioning separation this patch exists to provide.
- The exact wheel-displacement test concern is unproven robustness hardening, not the hosted failure below or a new merge regression. No assertions, tolerances or retries were relaxed.
These do not justify reopening the already-reviewed behavior or expanding this merge refresh. No source lane remains outstanding.
Existing exact-head CI failure, not waived
Run 35644167735 completed with both browser 1/2 shards and CI required failed. The other nine reported checks passed. Chromium and WebKit each failed layout.spec.mjs:636, in “panel restoration yields to a new wheel reading position” (107 passed / 1 failed per job).
I traced that failure to its actual owner: the test opens Bestie beside ChannelTimeline, never ThreadPanel. The test, timeline helper and channel scroll owner are byte-identical to the pinned base. This PR’s shared-fixture change only adds optional delivery to app.reply, which that test does not call.
The test observed a decrease in scrollTop, then rejected an unchanged visible message ID. Its tall-row anchor also has a Y coordinate, but the reported assertion ignores Y; equal IDs alone cannot distinguish movement within a tall message from a later snap-back. This establishes a real unresolved hosted failure, not a demonstrated PR-introduced thread regression or a proven flake. Resolve or explicitly disposition the failed gate before merge readiness; this review does not waive it or authorize unrelated repairs.
Evidence limits
Pinned-object source review on Blox only. No checkout, dependency installation, build, test execution, CI rerun, or live UI validation. Base-to-head git diff --check passed. Earlier implementation/local browser results remain separately attributed evidence, not tests run by this automation. No live-relay, native-GUI, screen-reader or release certification.
Signed-off-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz>
Use 24 tall rows and require the original anchor to intersect the viewport before closing Bestie. This preserves detection of a gesture handler that fails to clear restoration authority without restoring large fixture histories. Signed-off-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz>
Carl refreshed this PR on Wes’s behalf; Pinky authored the original fix.
Current state: refreshed on main
Head
798bd53457daba05394e0d0dfcc7d688887ee850includes main7ae4324e5d3079a960711db55c4abb3f3a4a035b(merged #110) through a non-rewriting merge. Required reviewer/code-owner approval and current-head CI remain merge gates; this is not an approval or merge action.Change
Restore the documented ordinary reply-count behavior: finish at the bottom of bounded returned history unless the reader intervenes. A mounted ordinary root acknowledges navigation before the existing 15-second deadline without forcing root reveal or settling scrolling. Exact-message reveal, focus, cancellation, and Back/Forward keep their existing owners.
Production diff remains 19 additions / 6 removals in
ThreadPanel.tsx. No new timeout, navigation API, reader, transport, or dependency. Bottom still means the bottom of returned history, not necessarily the newest reply beyond the existing ten-page limit.Main integration
layout.spec.mjs, for five files total.Follow-up: preserve wheel-intent regression coverage
At Wes’s request, this PR also addresses the coverage finding on merged #110. The new commit
798bd53changes onlytests/browser/layout.spec.mjs(+7/-1): use 24 tall messages instead of 20 and assert that the old restored row still intersects the viewport before closing Bestie. Otherwise scrolling the old row offscreen bypasses the stale-anchor behavior the test must detect. Existing bounded gestures, progress checks and final same-ID/Y tolerance remain intact. No new cases, helpers, dependencies, timeouts or production changes.Current-head validation on local macOS, using pinned tools:
798bd53457daba05394e0d0dfcc7d688887ee850:bin/pnpm exec playwright test -c tests/browser/playwright.config.mjs '/layout.spec.mjs$' --project chromium --project webkit --no-deps --workers 2: 16/16 passed, zero retries, 25.8s runner time.d05c861plus the exact subsequently committed layout patch: a test-build-only transform deleted justrestoredAnchor.current = undefinedfrom the wheel gesture handler. Both engines rejected the mutant at the final anchor assertion by 239.8125px, after the new visible-old-row precondition passed. The mutation was removed and never committed. Before this correction, the same mutant passed the test(browser): scroll past tall rows before asserting a new reading row #110 test in both engines.9ef8757head.The earlier 32-case thread/navigation browser run below is historical, not rerun for this layout-only follow-up. Broad current-head CI is pending at handoff; no native/live-relay/release validation is claimed. No performance improvement is claimed by the fixture correction.
Prior refresh validation (
9ef8757, historical)All commands below ran on clean
9ef8757locally on macOS through the pinned tools:bin/pnpm test:browser navigation-thread-history.spec.mjs message-navigation.spec.mjs composer-links.spec.mjs --project chromium --project webkit --no-deps: 32/32 passed, zero retries, 57.8s runner time. Full files in both engines, including ordinary bottom/reader intent, Back, exact targets, cancellation, session replacement, membership loss, stream repair, and composer links. Measurement projects intentionally not duplicated locally.git diff --checkand all three commit DCO trailers verified. Hosted DCO Check passed at this head.Test-layer accounting and limits
Relative to main, this PR adds two browser cases per engine and removes none: actual scroll geometry/focus through held pagination, with and without intervening user reading. The 120 seeded replies are required to cross pagination boundaries, not general startup data. State/gesture/deadline/cancellation permutations remain in the existing colocated tests. This refresh adds no further cases and does not broaden or rewrite the legacy harness.
Historical fail-then-pass evidence: the original bottom-position regression was reproduced on untouched main
06737ccand passed with the original fix in both engines. The latest refresh preserves that production patch; it does not claim a new before/after performance benchmark. The original standalone typing/selector corrections were separately verified and are now superseded by current-main fixtures.No live-relay, native-GUI, screen-reader, or release certification. No timeouts, retries, assertions, or tolerances were relaxed.